YambDown = {
	name: "down",
	yamb: null,
	
	init: function() {
		this.yamb.table.find("td[game_column="+this.name+"]").eq(0).addClass("toplay");
	},
	
	play: function(td) {
		if(this.yamb.toPlay(td)) {
			var value = this.yamb.getGameValue(td.attr("game_row"));
			td.html(value);
			td.addClass("played").removeClass("toplay");
			
			var nextRow = td.parent().next();
			if(nextRow.hasClass("sum")) {
				nextRow = nextRow.next();
			}
			var next = nextRow.find("td.field[game_column="+this.name+"]");
			if(next.length) {
				next.addClass("toplay");
			}
			return true;
		}
		return false;
	},
	undo: function(td) {
		var nextRow = td.parent().next();
		if(nextRow.hasClass("sum")) {
			nextRow = nextRow.next();
		}
		var next = nextRow.find("td.field[game_column="+this.name+"]");
		if(next.length) {
			next.removeClass("toplay");
			td.addClass("toplay").removeClass("played");
		}
	}
};